<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>chushi</title>

</head>
    <!-- 引入Vue -->
    <script src="../js/vue.js"></script>
<body>
    <div id="app">
        <h2>欢迎来到{{name}}学习vue</h2>
        <button v-on:click="showInfo">点我提示信息</button>
        <button @click="showInfo1">点我提示信息（不传参）</button>
        <button @click="showInfo2($event, 66)">点我提示信息（传参）</button>
    </div>
</body>
<script  type="text/javascript">
    new Vue({
        el:'#app',
        data:{
            name:'安徽财经大学'
        },
        methods: {
            showInfo(){
                alert('点我提示信息')
            },
            showInfo1(event){
                console.log(event)
                alert('点我提示信息1')
            },
            showInfo2(event,number){
                console.log(event)
                alert('点我提示信息2',number)
            }
        },  
    })
</script>
</html>